<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="ulbox">
        <!-- <li>姓名：lilia,年龄：18</li> -->
    </ul>
    <script>
        var arr=[
            {name:"lilia",age:18},
            {name:"lilib",age:28},
            {name:"lilic",age:45},
            {name:"lilid",age:16}
        ]

        let str="";
        for(let i=0;i<arr.length;i++){
           str+=`<li>姓名：${arr[i].name},年龄：${arr[i].age}</li>`
        }
        console.log(str);
        ulbox.innerHTML=str;
    </script>
</body>
</html>